package com.artqiyi.dollmachine.views.activity;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.artqiyi.dollmachine.R;
import com.artqiyi.dollmachine.common.Base.BaseActivity;
import com.artqiyi.dollmachine.model.entity.TipBean;
import com.artqiyi.dollmachine.model.entity.UserInfoBean;
import com.artqiyi.dollmachine.presenter.SettingPresenter;
import com.artqiyi.dollmachine.views.adapter.TipAdapter;
import com.artqiyi.dollmachine.views.widget.SwitchButton;
import com.artqiyi.dollmachine.views.widget.ToolBarView;
import com.artqiyi.dollmachine.views.widget.VerticalBannerView;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import timber.log.Timber;

/**
 * author: PengCheng
 * time: 2017/12/11 0011
 * desc:
 */

public class SettingActivity extends BaseActivity<SettingPresenter> implements View.OnClickListener, SwitchButton.OnCheckedChangeListener {
    @Bind(R.id.tvLogout)
    TextView tvLogout;
    @Bind(R.id.mainLayout)
    LinearLayout mainLayout;

    @Override
    public SettingPresenter getPresenter() {
        return new SettingPresenter();
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_setting;
    }

    @Override
    protected void handleToolBar(ToolBarView toolBar) {
        super.handleToolBar(toolBar);
        toolBar.setTitleText("设置");
    }

    @Override
    public void initView(Bundle savedInstanceState) {
        tvLogout.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tvLogout:
                mPresenter.doLogout();
                break;
            default:
                break;
        }
    }

    @Override
    public void onCheckedChanged(SwitchButton view, boolean isChecked) {
        switch (view.getId()) {
            case R.id.bgmSwitchBtn:

                break;
            case R.id.soundEffectSwitchBtn:

                break;
            default:
                break;
        }
    }

}
